import Vue from "vue";
import axios from "axios";

const detail = Vue.component("detail", {
  template: `
      <div class="111">
          <img v-bind:src="detailData.images" alt="" srcset="">
          <h1>{{ detailData.title }}</h1>
          <p>{{ detailData.content }}</p>
      </div>
      `,
  data() {
    return {
      detailData: {},
    };
  },
  created() {
    this.getListDetail();
  },
  methods: {
    getListDetail() {
      var _this = this;
      axios.get("./detail-data.json").then(function (response) {
        _this.detailData = response.data;
        _this.hideList = true;
        console.log(response.data);
      });
    },
  },
});

export default detail;
